The graph of nodes
Starting position to go to
The end position
The positions between start and end
Sum of weights (cost) to get to goal from start
1 GridWithWeights!(XY, int) grid = diagram4(); 2 3 XY[XY] came_from; 4 int[XY] cost_so_far; 5 a_star_search(grid, XY(1, 4), XY(7, 8), came_from, cost_so_far); 6 XY[] path = reconstruct_path(came_from, XY(1, 4), XY(7, 8)); 7 8 // TODO: asserts
Locates the next node in graph to get to a position Uses A* search algorithm Can use any sortable value type